const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  user:(state)=>{
    let user=state.user.user;
    if(user){
      return typeof user ==='object'?user:JSON.parse(user);
    }else{
      return null;
    }
  },
  visitedViews: state => state.tagsView.visitedViews,
  cachedViews: state => state.tagsView.cachedViews
}
export default getters
